<?php
require_once 'AipOcr.php';

// 你的 APPID AK SK
const APP_ID = '16673201';
const API_KEY = 'r2h1nsSgFc5p3wEcjBLYA8xa';
const SECRET_KEY = 'cFk5N2ZX6AqUAc4TOIlGRScANIbwun61';

$client = new AipOcr(APP_ID, API_KEY, SECRET_KEY);




$image = file_get_contents('1.png');



// 调用通用文字识别, 图片参数为本地图片

$a = $client->basicGeneral($image);
$arr = $a['words_result'];
foreach($arr as $v){
	echo $v['words']."<br>";
}


echo "<pre>";
print_r($a);
echo "</pre>";



?>